home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-desktop-9.10-i386-PL.iso / casper / filesystem.squashfs / usr / share / checkbox / registries / lsb.pyc (.txt) < prev    next >
Python Compiled Bytecode  |  2009-11-11  |  2KB  |  40 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. from checkbox.lib.cache import cache
  5. from checkbox.properties import String
  6. from checkbox.registries.command import CommandRegistry
  7.  
  8. class LsbRegistry(CommandRegistry):
  9.     '''Registry for LSB information.
  10.  
  11.     Each item contained in this registry consists of the information
  12.     returned by the lsb_release command.
  13.     '''
  14.     command = String(default = 'lsb_release -a 2>/dev/null')
  15.     default_map = {
  16.         'Distributor ID': 'distributor_id',
  17.         'Description': 'description',
  18.         'Release': 'release',
  19.         'Codename': 'codename' }
  20.     
  21.     def __init__(self, filename = None, map = None):
  22.         super(LsbRegistry, self).__init__(filename)
  23.         if not map:
  24.             pass
  25.         self._map = self.default_map
  26.  
  27.     
  28.     def items(self):
  29.         items = []
  30.         for l in self.split('\n'):
  31.             if l:
  32.                 continue
  33.             _[1][l]
  34.         
  35.         return items
  36.  
  37.     items = cache(items)
  38.  
  39. factory = LsbRegistry
  40.